package com.cinc.ebc.mm.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cinc.ebc.mm.entity.MmStockInit;
import com.cinc.ebc.mm.entity.MmStockInitDetail;
import com.cinc.ebc.mm.model.MmStockInitDetailModel;
import com.cinc.ebc.mm.vo.MmStockInitDetailPage;


import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 库存初始化
 * @Author: jeecg-boot
 * @Date: 2022-07-03
 * @Version: V1.0
 */
public interface IMmStockInitService extends IService<MmStockInit> {

    /**
     * 添加一对多
     */
    public void saveMain(MmStockInit mmStockInit, List<MmStockInitDetail> mmStockInitDetailList);

    /**
     * 修改一对多
     */
    public void updateMain(MmStockInit mmStockInit, List<MmStockInitDetail> mmStockInitDetailList);

    /**
     * 删除一对多
     */
    public void delMain(String id);

    /**
     * 批量删除一对多
     */
    public void delBatchMain(Collection<? extends Serializable> idList);

    void detaiPage(Page<MmStockInitDetailModel> page, MmStockInitDetailPage detailPage);

    List<MmStockInitDetailModel> detailList(MmStockInitDetailPage detailPage);

    void handleInit(List<MmStockInitDetailPage> detailPageList) throws Exception;

    void writeOff(List<MmStockInitDetailPage> detailPageList) throws Exception;

    void delDetail(String id) throws RuntimeException;
}
